package cn.weiyang.action;

import cn.weiyang.biz.UsersBiz;
import cn.weiyang.biz.UsersBizImpl;
import cn.weiyang.entity.Users;

/**
 * Created by Administrator on 2017/7/6.
 */
public class UsersAction extends BaseAction {
    private Users users;
    public String reg(){
        UsersBiz ub=new UsersBizImpl();
        int res=ub.reg(users);
        if(res>0){
            return INPUT;
        }
        return "regs";
    }
    public String login(){
        UsersBiz ub=new UsersBizImpl();
        Users users2=ub.login(users);
        if(null!=users2){
            getSession().setAttribute("users",users2);
            return SUCCESS;
        }else{
            return INPUT;
        }

    }

    public Users getUsers() {
        return users;
    }

    public void setUsers(Users users) {
        this.users = users;
    }
}
